﻿@using Scorpicore.MVC.Models
@{
    ViewBag.Title = "Топ 10 потребители";
}

<h2 class="legend-title">Топ 10 потребители</h2>

@(Html.Kendo().Grid<TopTenUsersViewModel>()
    .Name("top-ten-users")
    .Columns(c =>
    {
            @*c.Bound(u => u.AvatarUrl).Template(@<text><img src="@item.AvatarUrl" /></text>);*@
            c.Bound(u => u.AvatarUrl).ClientTemplate("<img src='#: AvatarUrl #' style='width:30px;height:30px' />").Width(50);
            @*c.Bound(model => model.UserName).Width(100);*@   
            c.Bound(model => model.UserName).ClientTemplate("<a href='/Home/GetNameToSearch?name=#: UserName #' >#: UserName #</a>").Width(100);
            //c.Bound(model => model.Banknotes).Width(100);   
            c.Bound(model => model.Tracks).Width(100);   
            })
    .DataSource(data =>
    {
        data.Ajax().Read(act => act.Action("ReadTopTenUsers", "TopTen"));
    }))